import request from '@/utils/request'
import type { loginForm, loginResponseData, userResponseData } from './type'

enum API {
  LOGIN = '/user/login',
  USER_INFO = '/user/info',
}

export const reqLogin = (data: loginForm) =>
  request.post<any, loginForm>(API.LOGIN)

export const reqUserInfo = () =>
  request.get<any, userResponseData>(API.USER_INFO)
